import * as React from 'react';
import MarkdownEditor from '@uiw/react-markdown-editor';
interface IMarkDownProps {
}

const MarkDown: React.FunctionComponent<IMarkDownProps> = (props) => {
  const [markdown, setMarkdown] = React.useState('')
  const updateMarkdown = (editor,data,value) => {
    console.log(editor)
    console.log(data)
    console.log(value)
    setMarkdown(value)

  }
  return (
    <div>
      markdown编辑器
      <MarkdownEditor
        value={markdown}
        onChange={updateMarkdown}
        height = { 600 }
      />
      { markdown }
    </div>
  )
};

export default MarkDown;
